r[5];c(int*a,int*b){return*a-*b;}main(){for(gets(r);~scanf("%d%d%d%d%d",r,r+1,r+2,r+3,r+4);printf((r[4]-r[1])<4?"%d\n":"KIN\n",(r[1]+r[2]+r[3])))qsort(r,5,4,c);}
